namespace CSharpPro._1030;

public class Demo
{
    private int id;//字段 feild
    //属性
    public int Id
    {
        get=>id;
        set=>id=value;
    }
    
    public void TestPrint()
    {
        // Father father = new Father();
        // father.Print();
        Child child = new Child();
        child.Print();
        Console.WriteLine("==============");
        Father f1=new Father();
        f1.Print();
        Father f2=new Son();
        f2.Print();
        //UserService userService=  new UserServiceImpl();
        //userService.AddUser(new Student() );

        // Convert.ToInt16()；
    }
//方法重载,同一个类中，方法名字一样，参数个数，类型，顺序不同
    public int Add(int a, int b)
    {
        return a + b;
    }
    
    public int Add(int a, int b, int c)
    {
        return a + b + c;
    }
    
}